home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
- * *
- * fpl.library - A shared library interpreting script langauge. *
- * Copyright (C) 1992-1994 FrexxWare *
- * Author: Daniel Stenberg *
- * *
- * This program is free software; you may redistribute for non *
- * commercial purposes only. Commercial programs must have a written *
- * permission from the author to use FPL. FPL is *NOT* public domain! *
- * Any provided source code is only for reference and for assurance *
- * that users should be able to compile FPL on any operating system *
- * he/she wants to use it in! *
- * *
- * You may not change, resource, patch files or in any way reverse *
- * engineer anything in the FPL package. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * *
- * Daniel Stenberg *
- * Ankdammsgatan 36, 4tr *
- * S-171 43 Solna *
- * Sweden *
- * *
- * FidoNet 2:201/328 email:dast@sth.frontec.se *
- * *
- ************************************************************************/
-
- COMPILING
- =========
-
- All versions:
- -------------
- FPL has been developed on Amiga and under AIX (IBM's UNIX version) using
- SAS/C development system version 6 and the internal AIX `cc' compiler combined
- with the `xcdb' debugger.
-
- The FPL source code is highly portable. Source code packages I've received
- during my life with programming, have often turned out to be hard to compile,
- contained innumerous errors and the only conclusion you do is that the
- distributed source code is not the same one that created the executable. This
- is *NOT* a source code package like that. FPL is written in ANSI C and the
- source code distributed is the only source used when FPL was compiled. Using
- SAS/C on Amiga and the standard `cc' (or perhaps `gcc') under UNIX will
- compile error free! Use 'ANSI' option with any other compiler to achieve best
- possible result!
-
- If you add or change anything major when porting, please send a copy of that
- to me to apply in the original FPL package.
-
- All versions are easily tested. Try running `SFPL demo.FPL' and if that
- works, you know that _most_ of FPL is working.
-
- Using the `DEBUG' define activates a lot of extra checking and debugging
- possibilities. Combined with the MEMORY_COOKIE define in "script.h", a good
- piece of memory writing checks is performed. The `MEMORY_QUEUE' enbles the
- memory queuing system. (Though I've found out some kind of bug somewhere in
- the code within the DEBUG symbol... :()
-
- FPL runs and depends a lot on eight bit characters. Other character sets is
- easily supported by changing the defines in "script.h", but modifying it to
- other than eight bit characters will give you hard and boring work!
-
- Compilers not supporting ANSI C will have a hard time compiling this!
-
- Amiga version:
- --------------
- Assign FPL: to the FPL directory before compiling.
-
- You can make two version of the fpl.library, or more specificly one
- library version and one standard executable file version.
-
- The development of this started using SAS/C v5.10 and since that lacked proper
- library debugging features, I inserted some `#ifdef's and `#define's in the
- source so that I could create both a library version and a version done as
- a common executable for debugging. As you can see in the Makefile, the
- define `SHARED' constructs the library. Just a 'make' will create the
- library, while a 'make FPL' will create the executable.
-
- The library version is using low level assembler routines for stack
- allocating/expanding/swapping (I got initial help from Kjell Ericson to make
- those as good as they are today).
-
- Some people have experienced troubles when trying to compile this. I can't
- understand why!
-
- Compiling the executable file version will visualize a warning 205
- (`macro may have side effects' or something like that), but don't bother,
- the macro it warns about is perfectly safe.
-
- __inline has been used in a few places to make the `Global Optimizer'
- inline those functions in the code.
-
- If you're trying to compile this without the SAS/C compiler, you will hit
- some troubles, but nothing that you shouldn't be able to overcome!
-
- UNIX versions:
- --------------
- I have compiled FPL 11.1 under SVR4 UNIX without any kind of problems,
- though I have a lot of projects to work on and my time is limited and I'll
- bet there are more UNIX flavours than a signed char hand handle...!
-
- I spent many hours on this project writing the program under UNIX. The
- source features a small number of `#ifdef's to make this possible.
- The UNIX version I've used mainly is AIX, which is a mix of BSD and SVR4,
- OSF/1 builts heavily upon it. The code is easily ported into other UNIX
- environments. The UNIX version can also be compiled into a shared library! I
- just don't know if it will work with anything but AIX, or not, but do try!
- 'make' will create the shared library 'libfpl.a' (in good old UNIX naming
- standard) while 'make FPL' will build the executable version.
-
- I added (940314) the file 'Makefile.SVR4' which should compile FPL into a
- shared library (libfpl.a) under any SVR4 UNIX!
-
- (I ported FPL to SunOS v4.1.1 and Dell Unix v2.2. The SUN `cc' compiler
- promptly refuses some things (like the Data structure members which are
- function pointers, DaSt's note), so I used the GNU `gcc' compiler instead.
- The Dell Unix (SVR4) works like a charm, but will give a silly little warning
- for the '\a'. You can safely ignore it. / BjSt)
-
- Compiling FPL v6.0 under SunOS 4.1.X did result in segmentation fault.
- Define VARARG_FUNCTIONS for SunOS compilings!
-
- OS/2 version:
- -------------
- Since the 12th of February 1994, I include makefile.os2 and "FPL.def" file
- in the FPL package to enable compiling FPL into a DLL (shared library) under
- OS/2. The IBM C-Set/2 compiler does complain a *LOT* on using bitwise
- operators on signed integers, but what can I do? I want bitwise operators on
- signed integers!!
-
- DOS version:
- ------------
- I actually thought of making one. Then I tried Turbo C and discovered that
- it doesn't look upon a single byte 10 as a newline character. That, plus the
- fact that DOS compilers too often think in terms of 16-bit made me skip all
- further efforts. Later modifications of FPL such as turning `int' into `long'
- throughout the entire source code has enhanced DOS porting possibilities, but
- is there really anyone who can do anything _serious_ with MS-DOS?!?.
-
- New versions:
- -------------
- Use `#ifdef's extensively and do not modify any part of the source code
- that do not affect the system you're fixing it to run under.
-
- MAKEFILE
- ========
-
- This package includes Makefile.AIX for AIX specific options, smakefile
- for the Amiga SAS/C compiler, Makefile.OS2 for the OS/2 version,
- Makefile.SVR4 to make a shared library under any SVR4 UNIX with 'gcc' and
- finally Makefile.FILE which compiles with 'gcc' into simple link-objects
- (I've used this to compile FPL under SunOS 4).
-
- SOURCE CODES
- ============
-
- The source has been coded with great thought of program performance. It's
- not easy to understand but I have done my best adding comments all over the
- place. If you try to read and/or understand it, get in touch for better
- explanations to things...
-
- INCLUDE FILES
- =============
-
- The "FPL.h" is in two places in the archive, but that is because of the
- convinience of having it in the source directory and I really couldn't
- leave it out of the include directory tree!
- The include tree is very Amiga infected, I know, but I don't have the
- energy to change that fact at the moment. Following updates might change!
-
- When using the Amiga version you have to copy the files from the include
- directory to INCLUDE:. If you're using any other system, those files won't be
- needed.
-